/**
 * 
 */
package userController;

import java.io.IOException;

import userEntity.MembershipEntity;
import javafx.fxml.FXMLLoader;
import javafx.scene.Node;

/**
 * @author Yokesh Kumar
 *
 */
public class Navigator {
	public static final String BecomeAMemberFXML = "/userManagementUI/becomeAMember.fxml";
	public static final String MEMBERSHIPPAYMENTFXML = "/paymentUI/MembershipPayment.fxml";
	public static final String ReservationFXML = "/userManagementUI/Reservation.fxml";
	public static final String CUSTOMERFXML = "/userManagementUI/customer.fxml";
	public static final String CLERKFXML = "/userManagementUI/clerk.fxml";
	public static final String MANAGERFXML = "/userManagementUI/manager.fxml";
	public static final String SYSADMINFXML = "/userManagementUI/sysAdmin.fxml";
	public static final String SYSCreateEmp = "/userManagementUI/createEmploye.fxml";
	public static final String SYSActivate = "/userManagementUI/activateUser.fxml";
	public static final String SYSDeactivateUser = "/userManagementUI/deactivateUser.fxml";
	public static final String SYSUpdatePassword = "/userManagementUI/updatePassword1.fxml";
	public static final String MEMBERSHIPFXML = "/userManagementUI/membership.fxml";
	public static final String CANCELMEMBERSHIPFXML = "/userManagementUI/cancelMembership.fxml";
	public static final String MEMBERSHIPRENEWALPAYMENTFXML = "/paymentUI/membershipRenew.fxml";
	public static final String  ReservationInitialFXML="/reservationUI/Reservation_InitialScreen.fxml";
	public static final String  ClerkReservationInitialFXML="/reservationUI/ReservationClerk.fxml";
	public static final String ReservationPriceQuoteFXML= "/reservationUI/Reservation_Price_Estimate_Screen.fxml";
	public static final String CreditCardInfoFXML= "/reservationUI/Reservation_credit_Card_Screen.fxml";
	public static final String ReservationFinalInfo= "/reservationUI/ReservationInfo.fxml";
	public static final String CANCELRESERVATION= "/reservationUI/Cancel Reservation.fxml";
	public static final String CONFIRMCANCELLATION="/reservationUI/CancelReservationInfo.fxml";
	/**
	* Rent Module FXML Starts here
	*/
	public static final String RentInitialScreenFXML = "/rentReturnUI/RentInitialScreen.fxml";
	public static final String RentwithReservationInitialScreenFXML = "/rentReturnUI/Rent with reservation_InitialScreen1.fxml";
	public static final String RentSelectVehicleScreenFXML = "/rentReturnUI/Rent with reservation_Select_Vehicle_Screen.fxml";
	public static final String RentFinalizeReservationScreenFXML = "/rentReturnUI/Rent with reservation_Finalize_Rent1.fxml";
	public static final String RentFinalScreenFXML = "/rentReturnUI/Rent Final Screen.fxml";
	/**
	* Rent Module FXML Ends here
	*/


	/**
	 * Return Module FXML Starts here
	 */
	public static final String ReturnInitialScreenFXML = "/rentReturnUI/Return vehicle_Initial_Screen.fxml";
	public static final String ReturnSecondScreenFXML = "/rentReturnUI/Return vehicle_screen2.fxml";
	public static final String ReturnPriceBreakUpScreenFXML = "/rentReturnUI/Return vehicle_Price_BreakUp_Screen.fxml";
	public static final String ReturnPayByCashScreenFXML = "/rentReturnUI/Return vehicle_CashPaymentScreen.fxml";
	public static final String ReturnPaymentSucessInfoFXML = "/rentReturnUI/Return vehicle_PaymentInfoScreen.fxml";
	public static final String OverDUEVEHICLES = "/rentReturnUI/OverDueVehicleList.fxml";
	
	
	

	/**
	 * Return module FXML ends here
	 */

	public static final String MANAGERVEHICLEPURCHASEFXML = "/vehicleUI/PurchasedVehicleList.fxml";
	public static final String MANAGERVEHICLEPURCHASEEDITFXML = "/vehicleUI/EditVehicleSearch.fxml";
	public static final String MANAGERVEHICLEPURCHASEADDFXML = "/vehicleUI/AddVehicleForm.fxml";
	public static final String MANAGERVEHICLEPURCHASEEDITFORMFXML = "/vehicleUI/PurchaseEditForm.fxml";
	public static final String MANAGERREPORTMAINFXML = "/rentReturnUI/ReportMain.fxml"; //same
	public static final String SALE_LIST_VIEW_FXML = "/vehicleUI/saleListView.fxml";
	public static final String BOOKING_HISTORY_FXML = "/userManagementUI/bookingHistory.fxml";
	public static final String MOVE_VEHICLE = "/vehicleUI/MoveVehicle.fxml";
	public static final String SET_RATE = "/vehicleUI/setRate.fxml";
	public static final String REPORT = "/rentReturnUI/ReportMain.fxml"; //same
	public static final String VEHICLE_STATUS = "/vehicleUI/vehicleStatus.fxml";

	public static final String OVERALLVEHICLELIST = "/rentReturnUI/OverallVehicleList.fxml";
	//change password
	public static final String CHANGEPASSWORDFXML = "/userManagementUI/ChangePassword.fxml";
	//edit customer profile
	public static final String EDITCUSTOMERPROFILEFXML = "/userManagementUI/EditCustomerProfile.fxml";
	//Sell vehicle UI Edit
	public static final String VEHICLESALELISTFXML ="/vehicleUI/Sell_Scene1_Edit_SaleList_View.fxml";
	public static final String VEHICLESALESEARCHFXML = "/vehicleUI/Sell_Scene2_Edit_Search_Window.fxml";
	public static final String VEHICLETEXTFORMFXML = "/vehicleUI/Sell_Scene3_Edit_Text_Form.fxml";
	//Sell vehicle UI Sell
	public static final String VEHICLESELLSEARCHFXML = "/vehicleUI/Sell_Scene5_Sell_Search.fxml";
	public static final String VEHICLEEDITABLEFORMFXML = "/vehicleUI/Sell_Scene6_Sell_Editable_Form.fxml";
	public static final String VEHICLESECONDVIEWFORMFXML = "/vehicleUI/Sell_Scene7_Sell_UpdateDisplayInfo.fxml ";

    //SetRate vehicle UI
	public static final String SETRATECHOICEBOXFXML = "/vehicleUI/SetRate_Scene1_Choice.fxml";
	public static final String SETRATECARTYPECHOICEBOXFXML = "/vehicleUI/SetRate_Scene2_CarType.fxml";
	public static final String SETRATECARTYPEEDITFORMFXML = "/vehicleUI/SetRate_Scene3_CarRate_Edit_form.fxml";	
	public static final String SETRATECARTYPEUPDATEFORMFXML = "/vehicleUI/SetRate_Scene4_UpdateInfo.fxml";

	//edit profile and Update profile
	public static final String EDITPROFILEFXML = "/userManagementUI/EditProfile.fxml";
	
	//View Membership 
	public static final String VIEWMEMBERSHIPFXML ="/userManagementUI/MembershipPointsHistory.fxml";
	//end
	
	//FAQ
	public static final String FAQFXML ="/userManagementUI/FAQ.fxml";
	//end

	
	//Contact US
	public static final String contactUsFXML ="/userManagementUI/contactUs.fxml";
	//end
	public static final String EXCEPTIONINFOFXML = "/vehicleUI/ExceptionInfo.fxml";
	
	// Home screens
	public static final String CUSTOMER_HOME = "/userManagementUI/Home_Customer.fxml";
	public static final String CLERK_HOME = "/userManagementUI/Home_Clerk.fxml";
	public static final String MANAGER_HOME = "/userManagementUI/Home_Manager.fxml";
	public static final String SYSADMIN_HOME = "/userManagementUI/Home_Sysadmin.fxml";
	
	
	public static final String CREATELOGINFAQFXML = "/userManagementUI/createLoginFAQ.fxml";
	public static final String CREATE_LOGIN_CONTACT_US_FXML = "/userManagementUI/createLoginContactUs.fxml";
	

	private static CustomerController customer;
	private static ClerkController clerk;
	private static ManagerController manager;
	private static SysAdminController sysAdmin;
	private static String phoneNumber;
	private static boolean initailize;





	/**
	 * @return the initailize
	 */
	public static boolean isInitailize() {
		return initailize;
	}


	/**
	 * @param initailize the initialize to set
	 */
	public static void setInitailize(boolean initailize) {
		Navigator.initailize = initailize;
	}



	



	/**
	 * @return the phoneNumber
	 */
	public static String getPhoneNumber() {
		return phoneNumber;
	}


	/**
	 * @param phoneNumber the phoneNumber to set
	 */
	public static void setPhoneNumber(String phoneNumber) {
		Navigator.phoneNumber = phoneNumber;
	}


	/**
	 * @param customer the customer to set
	 */
	public static void setCustomer(CustomerController customer) {
		Navigator.customer = customer;
	}


	/**
	 * @param clerk the clerk to set
	 */
	public static void setClerk(ClerkController clerk) {
		Navigator.clerk = clerk;
	}


	/**
	 * @param manager the manager to set
	 */
	public static void setManager(ManagerController manager) {
		Navigator.manager = manager;
	}


	/**
	 * @param sysAdmin the sysAdmin to set
	 */
	public static void setSysAdmin(SysAdminController sysAdmin) {
		Navigator.sysAdmin = sysAdmin;
	}


	public static void loadStackPane(String fxml) {
		try {
			if(customer != null){
				customer.setCustomerStackPane((Node) FXMLLoader.load(Navigator.class.getResource(fxml)));
			}
			else if(clerk != null){
				clerk.setClerkStackPane((Node) FXMLLoader.load(Navigator.class.getResource(fxml)));
			}
			else if(manager != null){
				manager.setManagerStackPane((Node) FXMLLoader.load(Navigator.class.getResource(fxml)));
			}
			else if(sysAdmin != null){
				sysAdmin.setSysAdminStackPane((Node) FXMLLoader.load(Navigator.class.getResource(fxml)));
			}
			else{
				System.out.println("Navigator: All controller values are null");
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
